file chooser dialog: Better spacing
authorMatthias Clasen <mclasen@redhat.com>
Fri, 24 Jul 2015 02:15:32 +0000 (22:15 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 24 Jul 2015 02:15:32 +0000 (22:15 -0400)
When the dialog is as narrow as possible, we still want some
space between the entry and the search button, so use margins
around the entry and label instead of box spacing.

gtk/gtkfilechooserdialog.c

index dc41d3232f205e20e85641392ada7a9b7989481b..66ed07123c36ccf75b52934a62a95bd3c7406f79 100644 (file)
@@ -567,9 +567,11 @@ setup_save_entry (GtkFileChooserDialog *dialog)
       GtkWidget *label;
       GtkWidget *entry;
 
-      box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
+      box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
       label = gtk_label_new_with_mnemonic (_("_Name"));
       entry = _gtk_file_chooser_entry_new (FALSE, FALSE);
+      g_object_set (label, "margin-start", 6, "margin-end", 6, NULL);
+      g_object_set (entry, "margin-start", 6, "margin-end", 6, NULL);
       gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
       gtk_container_add (GTK_CONTAINER (box), label);
       gtk_container_add (GTK_CONTAINER (box), entry);